import React from 'react'
import { Form, Card, Button, Input, Space } from 'antd'

export default function hospitalSetAddOrUpdate() {
  return (
    <Card>
      <Form labelCol={{ span: 2 }} wrapperCol={{ span: 22 }}>
        <Form.Item
          name="hosname"
          label="医院名称"
          rules={[
            {
              required: true,
              message: '请输入医院名称',
            },
          ]}
        >
          <Input></Input>
        </Form.Item>
        <Form.Item
          name="hoscode"
          label="医院编码"
          rules={[
            {
              required: true,
              message: '请输入医院编码',
            },
          ]}
        >
          <Input></Input>
        </Form.Item>
        <Form.Item
          name="apiUrl"
          label="api基础路径"
          rules={[
            {
              required: true,
              message: '请输入api基础路径',
            },
          ]}
        >
          <Input></Input>
        </Form.Item>
        <Form.Item
          name="contactsName"
          label="联系人姓名"
          rules={[
            {
              required: true,
              message: '请输入联系人姓名',
            },
          ]}
        >
          <Input></Input>
        </Form.Item>
        <Form.Item
          name="contactsPhone"
          label="联系人手机"
          rules={[
            {
              required: true,
              message: '请输入正确的手机号',
              pattern: /^1[3-9]\d{9}$/, //正则
            },
          ]}
        >
          <Input></Input>
        </Form.Item>
        <Form.Item wrapperCol={{ offset: 2 }}>
          <Space>
            <Button type="primary">保存</Button>
            <Button>返回</Button>
          </Space>
        </Form.Item>
      </Form>
    </Card>
  )
}
